#pragma once

const int SKY_ROUNDS = 10;
const int SKY_VNUMPERROUND = 36;
const float SKY_HEIGHT = 3000.0f;
const int SKY_TEXWIDTH = 1024;
const int SKY_TEXHEIGHT = 1024;
class CMUTSky{
public:
	int vnum;
	LPDIRECT3DVERTEXDECLARATION9 vdecl;
	LPDIRECT3DVERTEXBUFFER9 vb;
	LPDIRECT3DINDEXBUFFER9 ib;
	LPDIRECT3DTEXTURE9 skytex;
	LPDIRECT3DTEXTURE9 cloud;
	LPDIRECT3DTEXTURE9 sun;
	LPDIRECT3DTEXTURE9 domeblend;
	LPDIRECT3DTEXTURE9 lensflare;
	LPDIRECT3DSURFACE9 pDSurface;
	LPDIRECT3DQUERY9 pSunQuery;
	LPD3DXSPRITE sprite;
	LPD3DXEFFECT skyEffect;
	CMUTSky() : vnum(0), vdecl(0), vb(0), ib(0), skytex(0), sprite(0), pDSurface(0), domeblend(0), lensflare(0), skyEffect(0), pSunQuery(0){}
	HRESULT Create();
	void Render();
	void RenderSun( BOOL ZEnable=FALSE );
	void QuerySun();
	void RenderCloud();
	void RenderLensFlare();
	void InitData();
	void UpdateSky();
	void Release();
};
